package Package.IOStream.ByteStream.VideoTransmission;

import java.io.*;

public class VideoTransmission {
    public static final void VideoTransmission() throws IOException {
//        将一个位置的视频复制到另外的地方
long startTime=System.currentTimeMillis();
Video();
long endStart=System.currentTimeMillis();
        System.out.println(endStart-startTime);
    }
    public static final void Video() throws IOException {
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("D:\\insert\\01.mp4"));
        BufferedOutputStream Bos=new BufferedOutputStream(new FileOutputStream("D:\\insert\\javase\\a.mp4"));
        byte[] bys=new byte[1024];
        int len;
        while ((len=bis.read(bys))!=-1){
            Bos.write(bys,0,len);
        }
        bis.close();
        Bos.close();
    }
}
